#include<iostream>
#include<algorithm>
using namespace std;

int a[110];
void slove()
{
	int n;
	cin >> n;

	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
	}

	int res = a[0];
	for (int i = 0; i < n; i++)
	{
		res = min(a[i], res);
	}

	cout << res<<endl;
}
int main()
{
	slove();
	return 0;
}